package com.se2.antiqueexhibition.Service.impl;

import com.se2.antiqueexhibition.Mapper.AdminActivityMapper;
import com.se2.antiqueexhibition.Service.AdminActivityService;
import com.se2.antiqueexhibition.pojo.AdminActivity;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service
public class AdminActivityServiceimpl implements AdminActivityService {

    @Resource
    private AdminActivityMapper adminActivityMapper;

    @Override
    @Transactional
    public void insert(AdminActivity adminActivity) {

        adminActivityMapper.insert(adminActivity);
    }

    @Transactional
    public void delete(int id) {
        adminActivityMapper.delete(id);

    }



    @Transactional
    public void update(AdminActivity a) {
        adminActivityMapper.update(a);

    }

    @Override
    public List<AdminActivity> getActivity() {
        return adminActivityMapper.selectAll();
    }

    @Override
    public AdminActivity getActivityById(int id) {
        return adminActivityMapper.selectById();
    }

    @Override
    public void updateActivityStaus(int id, int status) {

    }
}
